﻿// <copyright file="AuthenticationHint.cs" company="SharpSTS">
// Copyright (c) 2007, 2008 All Right Reserved, http://sharpsts.com/
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Barry Dorrans</author>
// <email>barryd@idunno.org</email>
// <date>2008-06-13</date>
// <summary>Provides the data contract for the authentication hint used in a Get request for an Information Card.</summary>

namespace SharpSTS.CardControl
{
    using System.Runtime.Serialization;

    using Constants;

    /// <summary>
    /// A <see cref="DataContract"/> for the authentication details for a managed card.
    /// </summary>
    [DataContract(Name = "AuthenticationHint", Namespace = Namespaces.Data)]
    public class AuthenticationHint
    {
        /// <summary>
        /// Gets or sets the authentication hint.
        /// </summary>
        /// <value>The authentication hint.</value>
        /// <remarks>
        /// The hint varies according to <see cref="AuthenticationType"/>
        /// <list>
        /// <item>For Username / Password authentication the hint is the username.</item>
        /// <item>For managed cards backed by a self issued card the hint is the PPID of the self issued card.</item>
        /// <item>For certificate backed cards it is the certificate details.</item>
        /// </list>
        /// </remarks>
        [DataMember(Order = 1, IsRequired = true)]
        public string Hint
        {
            get; 
            set;
        }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>The description.</value>
        /// <remarks>This is used by the identity selector to prompt a user for the correct authentication details.</remarks>
        [DataMember(Order = 2, IsRequired = false)]
        public string Description
        {
            get; 
            set;
        }
    }
}
